package com.zw.yzk.kabu.data.network.task;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhanwei on 2017/3/6.
 */

public class AddShoppingCartTask extends Task {
    @Expose
    @SerializedName("product_detail")
    public List<Goods> goodsList;

    public static class Goods {
        @Expose
        @SerializedName("shop_id")
        public int shopId;
        @Expose
        @SerializedName("product_id")
        public int productId;
        @Expose
        @SerializedName("number")
        public int count;
        @SerializedName("product_sku_id")
        public String skuId;
    }

    public AddShoppingCartTask(List<Goods> goodsList) {
        this.goodsList = new ArrayList<>();
        if (goodsList != null) {
            this.goodsList.addAll(goodsList);
        }
    }
}
